module.exports = (key, value) => {
  const { writeFileSync } = require('fs')
  const { resolve } = require('path')
  const packageJson = require('../../package.json')
  packageJson.scripts[key] = value
  const fileName = resolve(__dirname, '../../', 'package.json')
  return writeFileSync(fileName, JSON.stringify(packageJson, '', '\t'))
}
